<?php 
include('header.php');
include('menu.php');
include('config.php');
include_once('connection/connection.php');
//echo "Form ID :".$formId=trim($_REQUEST['formId']);echo "<br>";
$villageid=$_REQUEST['val'];echo "<br>";
$sqlGetFormDetails="select * from tbl_dtls_q1_main where village_id='".$villageid."'";
$queryFormDetails=mysql_query($sqlGetFormDetails);
$rowFormDetails=mysql_fetch_array($queryFormDetails);
$formId=$rowFormDetails['id'];
//print_r($rowFormDetails);echo "<br>";
//$rowFormDetails['year_comm'];
//$jsOnLoad="enable_sanc1(true);source_dtls1(".$formId.");showhabit1(".$formId.");";
$jsOnLoad="source_dtls1(".$formId.");showhabit1(".$formId.");";
$jsOnLoad.="enable_sanc1(true);";
$jsOnLoad.="changeDistrict('district',".$rowFormDetails['district_id'].");";
$jsOnLoad.="changeBlock('block',".$rowFormDetails['district_id'].",".$rowFormDetails['block_id'].");";
$jsOnLoad.="changeTehsil('tehsil',".$rowFormDetails['district_id'].",".$rowFormDetails['tehsil_id'].");";
$jsOnLoad.="changePanchayat('panchayat',".$rowFormDetails['block_id'].",".$rowFormDetails['panchayat_id'].");";
$jsOnLoad.="changeVillage('village',".$rowFormDetails['panchayat_id'].",".$rowFormDetails['village_id'].");";
$jsOnLoad.="changeHabit('habit',".$rowFormDetails['village_id'].",".$formId.");";
$qr="Select * From tbl_dtls_q1_unhabit where loc_id=$formId";
$res=mysql_query($qr);
$num_unlisted = mysql_num_rows($res);
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<script language="javascript" type="text/javascript" src="js/validate1.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxFunction_q1.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxEditForm_q1.js"></script>
<script language="Javascript" type="text/javascript" src="js/ajaxFunction1_q1.js"></script>
<script language="Javascript" type="text/javascript" src="js/editajaxFunction1_q1.js"></script>
<script language=javascript>
function mult()
{
	var value1=document.getElementById('popul_benefited').value;
	var value2=Math.round(value1 * 1.29);
	//var value2=Math.round(value1 * 1.4);
	document.getElementById('present_popul').value=value2;	
}
function mult2()
{
	var value1=document.getElementById('factor1').value;
	var value2=document.getElementById('population_benefited1').value;
	var value3=Math.round(value1 * value2);
	document.getElementById('present_population1').value=value3;
	alert('Value of Population Benefited Field is '+ value2 +', Present Population is '+ value3 +' and Population Factor is ' + value1);	
}
</script>
<title>Edit Village</title>
</head>
<body onLoad="<?php echo $jsOnLoad;?>;">
<?php
if(isset($_POST['submit']))
{
		$fclick = true;
		//$dob = $_POST['dobyear'].'-'.$_POST['dobmonth'].'-'.$_POST['dobdate'];
		$dob=$_POST['date'];
		$id=$_POST['id'];
		$form_id=$_POST['form_id'];
		$_SESSION['form_id']=$form_id;
		$district=$_POST['district'];
		$block=$_POST['block'];
		$tehsil=$_POST['tehsil'];
		$panchayat=$_POST['panchayat'];
		$village=$_POST['village'];
		$cvc=$_POST['cvc'];
		$type_scheme=$_POST['type_scheme'];	
		//$type_scheme=implode(',',$type_scheme); 
		$name_scheme=$_POST['name_scheme'];
		$year=$_POST['year'];
		$capital_cost=$_POST['capital_cost'];
		if($_POST['scheme_sactioned']!='Other')
		{
			$scheme_sactioned=$_POST['scheme_sactioned'];
		}
		else
		{
			$scheme_sactioned=$_POST['scheme_sactioned_other'];
		}
		//$scheme_sactioned=$_POST['scheme_sactioned'];
		//$scheme_sactioned_other=$_POST['scheme_sactioned_other'];
		//$scheme_sactioned=implode(',',$scheme_sactioned); 
		//$scheme_sactioned=$scheme_sactioned . $scheme_sactioned_other;
		//echo $scheme_sactioned;
		//exit();
		$popul_benefited=$_POST['population_benefited'];
		$present_popul=$_POST['present_population'];
		$num_source=$_POST['num_source'];
		$hp_no=$_POST['hp_no'];
		$sp_no=$_POST['sp_no'];
		
		//echo $q1="INSERT INTO tbl_dtls_q1_main(id, form_id, district_id, date, block_id, tehsil_id, panchayat_id, village_id, cvc, type_scheme, name_scheme, year_comm, capital_cost, scheme_sactioned, population_benefited, present_population, no_sources, hp_nos, sp_nos, post_date) VALUES ('$id', '$form_id', '$district', '$dob','$block', '$tehsil', '$panchayat', '$village', '$cvc', '$type_scheme', '$name_scheme', '$year', '$capital_cost', '$scheme_sactioned', '$popul_benefited', '$present_popul', '$num_source', '$hp_no', '$sp_no', NOW())"; 
		echo $q1="UPDATE tbl_dtls_q1_main SET form_id='$form_id', cvc='$cvc', type_scheme='$type_scheme', name_scheme='$name_scheme', year_comm='$year', capital_cost='$capital_cost', scheme_sactioned='$scheme_sactioned', population_benefited='$popul_benefited', present_population='$present_popul', no_sources='$num_source', hp_nos='$hp_no', sp_nos='$sp_no' where id=$formId";
		$r1=mysql_query($q1);
			if($r1)
			{
				$relocatePage=true;
				//header('Location: critical_form2.php');
				//echo "success 2";
			}
			else 
			{
				$errorIns.="Error inserting main table <br>";
			}
			
		echo $q2="SELECT DISTINCT habitation_code, habitation_name from tbl_lookup_location where village_id='$village' order by habitation_code";
		$r2=mysql_query($q2);
		$num_rows = mysql_num_rows($r2);
		//$_SESSION['num_rows']=$num_rows;
		//echo $num_rows;
		echo $q3="SELECT id FROM tbl_dtls_q1_main where form_id='$form_id'";
		$r3=mysql_query($q3);
		$x=mysql_fetch_array($r3);
		$loc_id=$x['id'];
		$_SESSION['loc_id']=$loc_id;
		for($i=1; $i<=$num_rows; $i++)
		{
			$hname = 'name_habi'.$i;
			$hcode = 'habi_code'.$i;
			$type_habit='type_habit'.$i;
			$status = 'status'.$i;
			
			$hname=$_POST[$hname];	
			$hcode=$_POST[$hcode];
			$type_habit=$_POST[$type_habit];
			$status=$_POST[$status];
			
			//$q4="INSERT INTO tbl_dtls_q1_oh(loc_id, habit_name, habit_code, type_habit, status_e_nt) VALUES ('$loc_id', '$hname', '$hcode', '$type_habit', '$status')";
			echo $q4="UPDATE tbl_dtls_q1_oh SET status_e_nt='$status' where loc_id=$formId and habit_code=$hcode";
			$r4=mysql_query($q4);	
		}	
			if($r4)
			{
			
				$relocatePage=true;
				//header('Location: critical_form2.php');
				//echo "success 2";
			}
			else 
			{
				$errorIns.="Error inserting OH table <br>";
			}
			echo $qr1="Delete from tbl_dtls_q1_unhabit where loc_id=$formId";
			$res1=mysql_query($qr1);	
			//$num_unhabit=$_POST['num_unhabit'];
			for($i=1; $i<=$num_unlisted; $i++)
			{
				$un_habit='un_habit'.$i;
				echo $un_habit=$_POST[$un_habit];
				echo $q5="INSERT INTO tbl_dtls_q1_unhabit(loc_id, unhabit_name) VALUES ('$loc_id', '$un_habit')";
				$r5=mysql_query($q5);	
			}	
			if($r5)
			{
			
				$relocatePage=true;
				//header('Location: critical_form2.php');
				//echo "success 2";
			}
			else 
			{
				$errorIns.="Error inserting Unlisted Habitation table <br>";
			}
		
		echo $qr2="Delete from tbl_dtls_q1_sws where loc_id=$formId";
		$res2=mysql_query($qr2);	
		for($i=1; $i<=$num_source; $i++)
		{
			$source='source'.$i;
			$yield_min='yield_min'.$i;
			$yield_max='yield_max'.$i;
			$water_table_min='water_table_min'.$i;
			$water_table_max='water_table_max'.$i;
			$current_status='current_status'.$i;
			
			$source=$_POST[$source];
			$yield_min=$_POST[$yield_min];
			$yield_max=$_POST[$yield_max];
			$water_table_min=$_POST[$water_table_min];
			$water_table_max=$_POST[$water_table_max];
			$current_status=$_POST[$current_status];
			
			echo $q6="INSERT INTO tbl_dtls_q1_sws(loc_id, source, yield_min, yield_max, water_table_min, water_table_max, current_status) VALUES ('$loc_id', '$source', '$yield_min', '$yield_max', '$water_table_min', '$water_table_max', '$current_status')";
				$r6=mysql_query($q6);	
		}	
			if($r6)
			{
				$relocatePage=true;
				//header('Location: critical_form2.php');
				//echo "success 2";
			}
			else 
			{
				$errorIns.="Error inserting sws table <br>";
			}	
			
			if($errorIns==0) 
			{
				header('Location: editquestionnaire1_2.php');
			}
			else 
			{
				echo $errorIns;exit;
			}					
}
else
{
	$fclick = false;
	$flag=0;
}
?>
<div align="center">
<form action="" method="post" enctype="multipart/form-data" name="questionnaire1" id="questionnaire1" onSubmit="mult2()">
	<table border="0" width="737" id="table1" cellspacing="0" cellpadding="0">
		<tr>
			<td height="16">
			<p align="center">
			<font face="Verdana" style="font-size: 10pt; font-weight: 700" color="#000000">
			Edit Village</font></td>
		</tr>
		
		
		<tr>
			<td background="images/title.gif" height="25"><font color="#FFFFFF">&nbsp;
			<font style="font-size: 8.5pt; font-weight: 700" face="Arial">
			Main Location </font></font></td>
		</tr>
		<tr>
			<td>
				<table border="0" width="737" id="table2" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
					<tr>
						<td colspan="4">
							<span style="font-size: 4pt">&nbsp;</span>						</td>
					</tr>
					<tr>
						<td width="167">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color="#FF0000">&nbsp;&nbsp;*</font>District</font>						</td>
						<td width="239"><font id=district>
							<select name="district" id="district" class="txt" disabled="disabled">
								<option value="0">Select District</option>
        					</select></font><span id="districtLoader"></span>
					  <font id="factor"><input type="hidden" size="20" class="txt5"></font></td>
						<td width="167">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color="#FF0000">*</font>Date&nbsp;&nbsp;</font>						</td>
            			<td width="181">
						 <?php //dpulldown('dob',$getdate['mday'],$getdate['mon'],$getdate['year']);?>
						 <input type="text" name="date" id="date" size="30" height="18" class="txt" value="<?php echo $rowFormDetails['date'];?>" readonly>					  </td>
					</tr>
					<tr>
						<td width="167">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;
							<font color="#FF0000">*</font>Block </font>						</td>
						<td width="239"><font id=block>
							<select name="block" class="txt">
								<option value="0">==============</option>
					  </select></font><span id="blockLoader"></span>				    	</td>
						<td width="167">
							<font face="Verdana" style="font-size: 8.5pt" color="#000000"><font color=                        	"#FF0000">*</font>Revenue &nbsp;&nbsp;Tehsil&nbsp;&nbsp;&nbsp;</font>						</td>
						<td width="181"><font id=tehsil>
							<select name="tehsil" class="txt">
								<option value="0">==============</option>
					  </select></font><span id="tehsilLoader"></span>				    	</td>
			    	</tr>
			  </table>			</td>
		</tr>
		<tr>
			<td><span style="font-size: 4pt">&nbsp;</span></td>
		</tr>
		<tr>
			<td background="images/title.gif" height="25"><font color="#FFFFFF">&nbsp;
				</font><span style="font-weight: 700">
				<font face="Arial" style="font-size: 8.5pt" color="#FFFFFF">1. Scheme 
				Details</font></span></td>
		</tr>
		<tr>
			<td><span style="font-size: 3pt">&nbsp;</span></td>
		</tr>
		<tr>
			<td>
			<table width="737" height="228" border="0" cellpadding="0" cellspacing="1" bgcolor="#EEEEEE" id="table6">
				<tr>
					<td colspan="2"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="278" height="27">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000">
						Type of the Scheme (As of Now)</font>					</td>
					<td width="460">
						<font style="font-size: 8.5pt" face="Verdana" color="#000000">
						<input type="radio" name="type_scheme" id="type_scheme"value="P&T" <?php echo  ($rowFormDetails['type_scheme']=='P&T')?'checked':'';?>>P&amp;T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				  <input type="radio" name="type_scheme" id="type_scheme"value="TSS(P&T)" <?php echo  ($rowFormDetails['type_scheme']=='TSS(P&T)')?'checked':'';?>>TSS (P&amp;T)&nbsp;&nbsp; </font> </font>					</td>
				</tr>
				<tr>
					<td width="278" height="27">&nbsp;</td>
					<td width="460">
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font                        style="font-size: 8.5pt">
						<input type="radio" name="type_scheme" id="type_scheme" value="Piped" <?php echo  ($rowFormDetails['type_scheme']=='Piped')?'checked':'';?>>Piped                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>
					<!--	<input type="radio" name="type_scheme" id="type_scheme" value="WSS">                        Regional WSS&nbsp;&nbsp;&nbsp;-->
				  <input type="radio" name="type_scheme" id="type_scheme" value="Sanitary Diggs" <?php echo  ($rowFormDetails['type_scheme']=='Sanitary Diggs')?'checked':'';?>>Sanitary Diggs</font>					</td>
				</tr>
				<tr>
					<td width="278" height="30">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Name of the Schemes </font>					</td>
					<td width="460">
				  <input type="text" name="name_scheme" id="name_scheme" size="30" height="18" class="txt" value="<?php echo $rowFormDetails['name_scheme'];?>"></td>
				</tr>
				<tr>
					<td width="278" height="31">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Year of Commissioning</font></td>
					<td width="460">
						<select size="1" name="year" id="year" class="txt">
						<option selected value="0">Not Provided</option>
						<?php 
						foreach($year_comm as $key=>$val)
						{
							if($rowFormDetails['year_comm']==$val)
							{
		   						echo "<option value=$val selected>$val</option>";
							}
							else
							{
								echo "<option value=$val>$val</option>";
							}
						}
						?>
				  </select>					</td>
				</tr>
				<tr>
					<td width="278" height="32">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Capital Cost (in <img src="images/26rup1.jpg" width="10"> Lakh)</font></td>
						<!--<font face="Rupee Foradian" size="3">`</font>-->
					<td width="460">
				  <input type="text" name="capital_cost" id="capital_cost" size="30" height="18" class="txt" onBlur="float(this)" value="<?php echo $rowFormDetails['capital_cost'];?>">					</td>
				</tr>
				<tr>
					<td width="278" height="35">&nbsp;
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">
						Schemes Sanctioned Under </font>					</td>
					<td width="460"><select size="1" name="scheme_sactioned" id="scheme_sactioned" class="txt" onChange="enable_sanc1(true)">
                      <option selected value="0">Select Scheme</option>
                      <?php 
						foreach($scheme as $key=>$val)
						{
							$val1=$rowFormDetails['scheme_sactioned'];
						if($val1=='State-Plan-(Old-MNP)' || $val1=='NRDWP-(Old-ARDWP)' || $val1=='Swajal-Dhara-&-Sector-Reform')
						{
							if($val1==$val)
							{
		   						echo "<option value=$val selected>$val</option>";
							}
							else
							{
								echo "<option value=$val>$val</option>";
							}
						}
						if($val1!='State-Plan-(Old-MNP)' && $val1!='NRDWP-(Old-ARDWP)' && $val1!='Swajal-Dhara-&-Sector-Reform')
						{
							if($val1!=$val)
							{
		   						echo "<option value=$val selected>$val</option>";
							}
							else
							{
								echo "<option value=$val>$val</option>";
							}
						}
						}
						?>
                  </select></td>
			  </tr>
				<tr>
				  <td width="278" height="26">&nbsp;</td>
					<td width="460">
						 <font style="font-size: 8pt" face="Verdana" color="#000000"> If Other then specify&nbsp;</font>
				  <input type="text" name="scheme_sactioned_other" id="scheme_sactioned_other" value="<?php if($rowFormDetails['scheme_sactioned']!='State-Plan-(Old-MNP)' && $rowFormDetails['scheme_sactioned']!='NRDWP-(Old-ARDWP)' && $rowFormDetails['scheme_sactioned']!='Swajal-Dhara-&-Sector-Reform'){ echo $rowFormDetails['scheme_sactioned']; } else echo ''; ?>" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px"></td>
				</tr>
			</table>		</td>
	</tr>
	<tr>
		<td>
			<span style="font-size: 5pt">&nbsp;</span>		</td>
	</tr>
	<tr>
		<td background="images/title.gif" height="25"><font color="#FFFFFF">&nbsp;
			<font style="font-size: 8.5pt; font-weight: 700" face="Arial">
			2. Location </font></font>		</td>
	</tr>
	<tr>
		<td>
			<table border="0" width="737" id="table7" bgcolor="#EEEEEE" cellspacing="1" cellpadding=             "0">
				<tr>
					<td height="11" colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="285" height="29">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;                         <font color="#FF0000">*</font>Grampanchayat</font>					</td>
					<td width="477"><font id=panchayat>
						<select name="panchayat" class="txt">
						<option value="0">==============</option>
				  </select></font><span id="panchayatLoader"></span>			      </td>
				</tr>
				<tr>
					<td width="285">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color=                        "#FF0000">*</font>Village (s) Covered Names &nbsp;&nbsp;&nbsp;(MH)</font>					</td>
					<td width="477"><font id=village>
						<select name="village" class="txt">
						<option value="0">==============</option>
				  </select></font><span id="villageLoader"></span>				  </td>
				</tr>
				<tr>
					<td width="285" height="24">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Form Id</font></td>
					<td width="477"><div id="form_id">
				  <input type="text" size="23" name="form_id" id="form_id" class="txt" value="<?php echo $rowFormDetails['form_id'];?> " readonly></div>				  </td>
				</tr>
				<tr>
					<td width="285" height="28">&nbsp;
						<font style="font-size: 8.5pt" face="Verdana" color="#000000"><font color="#FF0000">*</font>Census Village Code</font></td>
					<td width="477"><font id=cvc>
						<input type="text" size="23" name="cvc" id="cvc" class="txt" value="<?php echo $rowFormDetails['cvc'];?>" readonly>	
				  </font>				  </td>
				</tr>
				<tr>
					<td colspan="4" background="images/title.gif" height="25">&nbsp;
					<font style="font-size: 8.5pt; font-weight: 700" face="Arial" color="#FFFFFF">
					3.Other Habitations (OH) covered</font></td>
				</tr>
		  </table>		</td>
	</tr>
	<tr>
		<td>
			<table border="0" width="737" id="table4" cellspacing="1" cellpadding="0" bgcolor="#EEEEEE">
				<tr>
					<td colspan="3"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td align="center" width="31%" bgcolor="#D7D7D7" height="47">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">Name of OH</font></td>
					<td align="center" width="24%" bgcolor="#D7D7D7" height="47">
						<font style="font-size: 8.5pt" face="Verdana" color="#990000">
						Code No. (As per IMIS)</font></td>
						<td align="center" width="17%" rowspan="" bgcolor="#D7D7D7">
						<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Type MH/ OH</font></td>
					<td align="center" width="28%" bgcolor="#D7D7D7" height="47">
						<font face="Verdana" style="font-size: 8.5pt" color="#990000">
						Actual Status at Site (E/NT)</font></td>
				</tr>	
		  </table>		</td>
	</tr>
	<tr>
		<td colspan="2"><div id="habit"></div></td>
	</tr>
	<tr><td colspan="4">&nbsp;</td></tr>
		<tr>
			<td height="22" colspan="2" bgcolor="#EEEEEE"><font style="font-size: 8.5pt; font-weight: 700" face="Arial" color="#000000">&nbsp;No. of Unlisted Habitation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input type="text" name="num_unhabit" id="num_unhabit" value="<?php echo $num_unlisted; ?>" class="txt5" onBlur="showunhabit();numeric(this)">
			</font></td>
		</tr>
		<tr><td colspan="3">&nbsp;</td></tr>
		<tr>
			<td colspan="3"><div id="show_unhabit"></div></td>
		</tr>
		
	<tr>
		<td width="767" background="images/title.gif" colspan="2" height="25">&nbsp;
			<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#FFFFFF">4. Population</font></span></td>
	</tr>
	<tr>
		<td height="47">
			<table border="0" width="737" id="table8" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
				
					<td width="165">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						Population Benefited </font>					</td>
					<td width="209">
					<div id="population_benefited">
				    <input type="text" class="txt5" name="population_benefited" id="population_benefited" onBlur="numeric(this)" size="20" value="<?php echo $rowFormDetails['population_benefited'];?>" readonly>
				  	</div>
				  <!--<input type="text" name="popul_benefited" id="popul_benefited" size="20" class="txt5" onBlur="mult();numeric(this)">-->				  </td>
					<td width="126">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">
						Present Population&nbsp;&nbsp;&nbsp; </font></td>
				  <td width="295">
				  <div id="present_population">
					<input type="text" size="20" class="txt5" name="present_population" id="present_population" value="<?php echo $rowFormDetails['present_population'];?>" readonly>
					</div>
					<!--<input type="text" name="present_popul" id="present_popul" size="20" class="txt5" onBlur="numeric(this)" readonly><font style="font-size: 8.5pt" face="Verdana" color="#000000">1.29 times of Population Benefited</font>-->				  </td>
				</tr>
				<tr>
					<td height="18" colspan="4">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;(as per 2001 census)</font></td>
				</tr>
		</table>		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td width="767" background="images/title.gif" height="25">&nbsp;<span style="font-weight: 700">
			<font face="Arial" style="font-size: 8.5pt" color="#FFFFFF">5. Sources of Water Supply</font></span></td>
	</tr>
	<tr>
		<td colspan="6">
			<table border="0" width="737" id="table10" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td colspan="4">
						<span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="172">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						No. of Sources</font></td>
				  <td width="589" colspan="3"><input type="text" name="num_source" id="num_source" size="20" onBlur="source_dtls();numeric(this)" class="txt5" value="<?php echo $rowFormDetails['no_sources'];?>" ></td>
				</tr>
				<tr>
					<td colspan="4">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp;</font></td>
				</tr>
				
				<tr>
					<td colspan="6"><div id="source_dtls"></div></td>
				</tr>
		  </table></td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td width="767" background="images/title.gif" height="25">&nbsp;
			<span style="font-weight: 700"><font face="Arial" style="font-size: 8.5pt" color="#FFFFFF">6. Hand pumps &amp; Single Phase pumps installed (on above	mentioned if any)</font></span></td>
	</tr>
	<tr>
		<td>
			<table border="0" width="737" id="table11" bgcolor="#EEEEEE" cellspacing="1" cellpadding="0">
				<tr>
					<td colspan="4"><span style="font-size: 4pt">&nbsp;</span></td>
				</tr>
				<tr>
					<td width="175">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						HP Nos.</font>					</td>
					<td width="572" colspan="3">
				  <input type="text" name="hp_no" size="20" class="txt5" onBlur="numeric(this)" value="<?php echo $rowFormDetails['hp_nos'];?>">					</td>
				</tr>
				<tr>
					<td width="175">
						<font face="Verdana" style="font-size: 8.5pt" color="#000000">&nbsp; 
						SP Nos.</font></td>
					<td width="572" colspan="3">
				  <input type="text" name="sp_no" size="20" class="txt5" onBlur="numeric(this)" value="<?php echo $rowFormDetails['sp_nos'];?>">					</td>
				</tr>
		  </table>		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>
			<p align="center">
			<input type="submit" value="Click for Continue" name="submit" style="font-size: 8pt; font-family: Verdana; border-style: solid; border-width: 1px" onClick="return validate1()">&nbsp;</p>		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
</table>
</form>		
</div>


</body>
</html>